<?
require("config.php");
require("header.php");
?>



<?
$showNewsletters = true;

$table = "med_newsletter";

$field = array(

"id",
"date",
"subject",
"details",
"pdf",
);

if ($id) $exp = "AND id = $id ";

$exp .= "ORDER by id desc Limit 1";


$r = unlimitQuery($table,$field,$exp);

$id = $r[0][0];
$pdf = "../pictures/med_newsletter/" . $r[0][4];

?>









<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 

    <td width="186" valign="top"> 
      <?require("nav.php")?>
    </td>
    <td width="11"><img src="images/shim.gif" width="11" height="1"></td>
    <td valign="top"> 
      <?require("menu.php")?>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td align="right"><table width="100%" border="0">
              <tr> 
                <td height="50" class="header">&gt;&gt; Newsletters</td>
              </tr>
            </table></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="5" height="303">
        <tr> 
          <td><b>
            <?=$r[0][2]?>
            </b> </td>
        </tr>
        <tr> 
          <td> 
            <?=outDate($r[0][1])?>
          </td>
        </tr>
        <tr> 
          <td valign="top">

		  
            <?=$r[0][3]?>
            <p> <br>
            </p></td>
        </tr>
        <tr> 
          <td> <div align="right"><?php if (!empty($r[0][4])) { ?><a href="<?=$pdf?>" target="_blank">Download <?=$r[0][4]?></a> | <?php } ?><a href="print.php?id=<?=$id?>&p=newsletter" target="_blank"><u> print this article</u></a> | 
              <a href="email.php?id=<?=$id?>&p=newsletters"><u>e-mail to friend</u></a></div>
          </td>
        </tr>
      </table>
      <br> 
			<?

$table = "med_newsletter";

$field = array(

"id",
"date",
"subject",
);

$exp = "ORDER by date asc";


$r = unlimitQuery($table,$field,$exp);

?>
      <strong>Archives of Newsletters:</strong>			
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
			<?php for ($i=0;$i<count($r);$i++) { ?>
        <tr>
          <td width="24%"><strong>
            <?=date("M Y", mktime(0,0,0,substr($r[$i][1], 5, 2),substr($r[$i][1], 8, 2),substr($r[$i][1],0,4)))?>
          </strong></td>
          <td width="76%"><strong>
            <a href="http://awtest.imaker.com.hk/en/newsletters.php?id=<?=$r[$i][0]?>"><?=$r[$i][2]?></a>
          </strong></td>
        </tr>
			<?php } ?>
      </table>
      <p>          <br> 
        <br>
        <br> 
      </p>
    </td>
    <td width="11"><img src="images/shim.gif" width="11" height="1"></td>
    <td width="173" valign="top">
	
	
<?require("list.php")?>	 
	  
	  
    </td>

  </tr>
</table>





<?require("footer.php")?>	